package com.lirh.mywebsocket.mqservice;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Component
public class Sender {
    @Autowired
    private AmqpTemplate amqpTemplate;
    public void send(String content){
        System.out.println("Sender : "+content);
        amqpTemplate.convertAndSend("hello",content);

    }
}
